
#include "EuclidianDistance.h"
#include "MahalanobisDistance.h"
#include "../Entities/Matrix.h"
#include "../Entities/Complex.h"

using namespace Entities;
using namespace Utilities;

int main(){
	Matrix<Complex<double>> m(3, 3);

	m(0, 0) = Complex<double>(9,-4);
	m(0, 1) = Complex<double>(-7.6,67);
	m(0, 2) = Complex<double>(-5,7.6);
	m(1, 0) = Complex<double>(90,76);
	m(1, 1) = Complex<double>(45,-46);
	m(1, 2) = Complex<double>(4.67,76.6);
	m(2, 0) = Complex<double>(7.4,-7.6);
	m(2, 1) = Complex<double>(-2.4,6.9);
	m(2, 2) = Complex<double>(3.8,1.76);

	Matrix<double> m2(3, 3);

	m2(0, 0) = 9;
	m2(0, 1) = -7.6;
	m2(0, 2) = -5;
	m2(1, 0) = 90;
	m2(1, 1) = 45;
	m2(1, 2) = 4.67;
	m2(2, 0) = 7.4;
	m2(2, 1) = -2.4;
	m2(2, 2) = 3.8;

	cout << Stat::mean(m2(0)) << endl;
	cout << Stat::variance(m2(0)) << endl;
	cout << Stat::median(m2(0)) << endl;
	cout << Stat::standardDeviation(m2(0)) << endl;
	cout << Stat::covariance(m2) << endl;
	cout << Stat::covariance(m2(0), m2(1)) << endl;
	Matrix<double> m3 = Distances::MahalanobisDistance::getMatCovInv(m2);
	cout << m3 << endl << m2(0) << endl << m2(1) <<endl << Distances::MahalanobisDistance::calculer(m3, m2(0), m2(1)) << endl;

	system("pause");

}